<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script  src="https://lib.baomitu.com/jquery/3.6.0/jquery.js"></script>

    <div id="list"></div>
    <script>
        // 如果你不想要这个换行，可以使用trim方法消除它。
        let dd=`

        
            <ul>
              <li>first</li>
              <li>second</li>
            </ul>
            `
            
            console.log(dd.trim());
    </script>
</body>

</html>